package org.stvd.entities.workflow.leave;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;
import org.stvd.entities.base.BaseEntity;
import org.stvd.entities.common.LongJsonDeserializer;
import org.stvd.entities.common.LongJsonSerializer;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 
/**
 * 
 * @Title BsLeaveInfo
 * @Destribution 请假申请实体类
 * @author fenglong
 * @date 2020年11月02日
 */
@Entity
@Table(name = "bs_leave_info")
public class BsLeaveInfo extends BaseEntity {
 
    private static final long serialVersionUID = 6012160847769199559L;
 
    /**
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long id = null;
 
    /**
     * 部门ID
     */
    @Column(name = "dep_id")
    private String depId = "";
 
    /**
     * 部门名称
     */
    @Column(name = "dep_name", nullable = false)
    @NotEmpty(message = "部门名称不能为空！")
    private String depName = "";
 
    /**
     * 员工ID
     */
    @Column(name = "emp_id")
    private String empId = "";
 
    /**
     * 员工姓名
     */
    @Column(name = "emp_name", nullable = false)
    @NotEmpty(message = "员工姓名不能为空！")
    private String empName = "";
 
    /**
     * 请假类型
     */
    @Column(name = "leave_type", nullable = false)
    @NotEmpty(message = "请假类型不能为空！")
    private String leaveType = "";
    
    /**
     * 请假类别
     */
    @Column(name = "leave_category", nullable = false)
    @NotEmpty(message = "请假类别不能为空！")
    private String leaveCategory = "";
 
    /**
     * 开始时间
     */
    @Column(name = "start_date", nullable = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date startDate = null;
 
    /**
     * 结束时间
     */
    @Column(name = "end_date", nullable = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date endDate = null;
 
    /**
     * 请假天数
     */
    @Column(name = "leave_days")
    private BigDecimal leaveDays = null;
 
    /**
     * 请假事由
     */
    @Column(name = "reason", nullable = false)
    @NotEmpty(message = "请假事由不能为空！")
    @Length(max = 200, message = "请假事由最大可输入200个字符！")
    private String reason = "";
 
    /**
     * 审批状态{见generalAuditStatusEnum}
     */
    @Column(name = "audit_status", nullable = false)
    private String auditStatus = "";
 
    /**
     * 审批人ID
     */
    @Column(name = "audit_uid", nullable = false)
    private String auditUid = "";
 
    /**
     * 审批人姓名
     */
    @Column(name = "audit_uname", nullable = false)
    private String auditUname = "";
    
    /**
     * 抄送人部门
     */
    @Column(name = "send_dep")
    private String sendDep = "";
 
    /**
     * 抄送人
     */
    @Column(name = "send_uid")
    private String sendUid = "";
 
    /**
     * 抄送人姓名
     */
    @Column(name = "send_uname")
    private String sendUname = "";
 
    /**
     * 备注信息
     */
    @Column(name = "remark")
    @Length(max = 200, message = "备注信息最大可输入200个字符")
    private String remark = "";
 
    /**
     * 流程ID
     */
    @Column(name = "process_id")
    private String processId = "";
 
    /**
     * 录入人
     */
    @Column(name = "create_user", nullable = false)
    private String createUser = "";
 
    /**
     * 录入时间
     */
    @Column(name = "create_time", nullable = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime = null;
 
    /**
     * 修改时间
     */
    @Column(name = "modify_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime = null;
    
    /**
     * 按小时请假开始时间
     */
    @Transient
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date StartDateT = null;
    
    /**
     * 按小时请假结束时间
     */
    @Transient
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDateT = null;
    
    /**
     * 请假小时数
     */
    @Transient
    private  BigDecimal leaveHour = null;
    
 
    public Long getId() {
        return id;
    }
 
    public void setId(Long id) {
        this.id = id;
    }
 
    public String getDepId() {
        return depId;
    }
 
    public void setDepId(String depId) {
        this.depId = depId;
    }
 
    public String getDepName() {
        return depName;
    }
 
    public void setDepName(String depName) {
        this.depName = depName;
    }
 
    public String getEmpId() {
        return empId;
    }
 
    public void setEmpId(String empId) {
        this.empId = empId;
    }
 
    public String getEmpName() {
        return empName;
    }
 
    public void setEmpName(String empName) {
        this.empName = empName;
    }
 
    public String getLeaveType() {
        return leaveType;
    }
 
    public void setLeaveType(String leaveType) {
        this.leaveType = leaveType;
    }
 
    public Date getStartDate() {
        return startDate;
    }
 
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }
 
    public Date getEndDate() {
        return endDate;
    }
 
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }
 
    public BigDecimal getLeaveDays() {
        return leaveDays;
    }
 
    public void setLeaveDays(BigDecimal leaveDays) {
        this.leaveDays = leaveDays;
    }
 
    public String getReason() {
        return reason;
    }
 
    public void setReason(String reason) {
        this.reason = reason;
    }
 
    public String getAuditStatus() {
        return auditStatus;
    }
 
    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }
 
    public String getAuditUid() {
        return auditUid;
    }
 
    public void setAuditUid(String auditUid) {
        this.auditUid = auditUid;
    }
 
    public String getAuditUname() {
        return auditUname;
    }
 
    public void setAuditUname(String auditUname) {
        this.auditUname = auditUname;
    }
 
    public String getSendUid() {
        return sendUid;
    }
 
    public void setSendUid(String sendUid) {
        this.sendUid = sendUid;
    }
 
    public String getSendUname() {
        return sendUname;
    }
 
    public void setSendUname(String sendUname) {
        this.sendUname = sendUname;
    }
 
    public String getRemark() {
        return remark;
    }
 
    public void setRemark(String remark) {
        this.remark = remark;
    }
 
    public String getProcessId() {
        return processId;
    }
 
    public void setProcessId(String processId) {
        this.processId = processId;
    }
 
    public String getCreateUser() {
        return createUser;
    }
 
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
 
    public Date getCreateTime() {
        return createTime;
    }
 
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
 
    public Date getModifyTime() {
        return modifyTime;
    }
 
    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
 
    public String getSendDep() {
        return sendDep;
    }
 
    public void setSendDep(String sendDep) {
        this.sendDep = sendDep;
    }
 
    public String getLeaveCategory() {
        return leaveCategory;
    }
 
    public void setLeaveCategory(String leaveCategory) {
        this.leaveCategory = leaveCategory;
    }
 
    public Date getStartDateT() {
        return StartDateT;
    }
 
    public void setStartDateT(Date startDateT) {
        StartDateT = startDateT;
    }
 
    public Date getEndDateT() {
        return endDateT;
    }
 
    public void setEndDateT(Date endDateT) {
        this.endDateT = endDateT;
    }
 
    public BigDecimal getLeaveHour() {
        return leaveHour;
    }
 
    public void setLeaveHour(BigDecimal leaveHour) {
        this.leaveHour = leaveHour;
    }
}
